package cn.org.timespace.ons.dao.base;

import java.util.List;

import cn.org.timespace.easyframe.model.permission.EfUser;
import cn.org.timespace.ons.action.base.UserMachineTypeModel;
import cn.org.timespace.ons.util.pager.Pager;
import cn.org.timespace.ons.vo.base.Options;
import cn.org.timespace.ons.vo.base.UserMachineType;

public interface UserMachineTypeDao {

public void save(UserMachineType transientInstance);
	
	public List<Options> findByCode(String code);
	
	public UserMachineType findById(java.lang.String id) ;

	public List<Object> findByCondition(UserMachineTypeModel model,Pager p);
	
	public List<Object> findByCondition(Pager p);
	
	public void update(UserMachineType instance);
	
	public void delete(UserMachineType persistentInstance) ;
	
    public UserMachineType doCheckOptionsNameIsExist(String userName,String name) ;
    
  //用于判断删除之前是否还存在关联
	public boolean isExistMachineRelation(String id,String userName);
	//列出可选的应用平台类型
	List<Object> findAppByCondition(UserMachineTypeModel model, Pager p,String nid);
	
	public boolean findTypeAuditByCondition(String appId,String macId,String userId);
	
	public List<UserMachineType> findByUserName(String userName);
	
	/**
	 * 验证当前登录用户的信息终端类型名称是否存在
	 * @param typeName
	 * @param efUser
	 * @return
	 */
	public boolean isExistByTypeName(String typeName,String userName);
}
